<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<head>
<script type="text/javascript" src="projectBase__PUBLIC__/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="projectBase__PUBLIC__/js/lhgdialog.js"></script>
<script type="text/javascript">

function showAddLevelOneMenu(){
 $.dialog({content: 'url:__URL__/addnewMenu',height:90,ok:false},'id').title("添加菜单");
}

function showHtmlEditor(id){
	var url='url:__URL__/menuEdit/id/'+id;
	 $.dialog({content:url }).title("添加窗体");
}

function deleteMenu(id){
	$('#menuid').val(id);
	if(confirm("是否确认删除?")){
		//$('#deleteForm').submit();
		
		$.ajax({
			  url: '__APP__/AddMenu/deleteMenu',
			  dateType: "json",
			  data:{menuid:id},
			  success: function(data) {
				 var re= eval("(" + data + ")");
			  if(re.status=='1'){
					//api.parent().location.reload(true);
					window.location.reload();
			  }
			  }
			});
	}
}
</script>
</head>
<div style="align:center">
<form id="deleteForm" name="deleteForm" action="__APP__/AddMenu/deleteMenu">
<input type="hidden" id='menuid' name='menuid' />
</form>
<p><a href="#" class="button" onclick="showAddLevelOneMenu()">添加一级菜单</a></p>
<table>
<volist name="list" id="vo">
<tr>

<td nowrap>{$vo.MENU_NAME}&nbsp;

</td>
<td><a href="#" class="btn green" onclick="deleteMenu({$vo.MENU_ID})">删除</a></td>
<!-- <td><a href="#" class="btn green" onclick="showHtmlEditor({$vo.MENU_ID})">编辑内容</a></td> -->
</tr>
</volist>
</table>

</div>
</body>
</html>